import request from '@/utils/request'

// 工单状态统计  首页半个月
// export const getTaskStatusApi = (start, end) => request.get(`/task-service/task/collectReport/${start}/${end}`)

// 获取当时工单汇总信息(人员统计头部信息)
export const getTaskStatusApi = (start, end) => request.get(`/task-service/task/taskReportInfo/${start}/${end}`)

// 获取一定时间范围之内的收入
export const getIncomeApi = (start, end) => request.get(`/order-service/report/orderAmount`, {
  params:{start,end}
})

// 获取一定时间范围之内的收入
export const getStatusIncomeApi = params => request.get(`/order-service/report/orderAmount`, {
  params
})

// 获取一定时间范围之内的分成总数
export const getBillApi = (start, end) => request.get(`/order-service/report/totalBill`, {
  params:{start,end}
})

// 获取一定时间范围之内的分成总数
export const getStatusBillApi = params => request.get(`/order-service/report/totalBill`, {
  params
})

// 获取一定时间范围之内的合作商分成汇总数据
export const getPartnerBillApi = params => request.get(`/order-service/report/partnerCollect`, {
  params
})

// 获取一定时间范围之内的订单总数
export const getOrderCountApi = (start, end) => request.get(`/order-service/report/orderCount`, {
  params:{start,end}
})

// 获取一定时间范围之内的订单总数
export const getStatusCountApi = params => request.get(`/order-service/report/orderCount`, {
  params
})

// 获取销售前几的商品
export const getGoodsRankApi = (topValue, start, end) => request.get(`/order-service/report/skuTop/${topValue}/${start}/${end}`)

// 销售额统计  图表1
export const getAmountApi = (type,start,end) => request.get(`/order-service/report/amountCollect/${type}/${start}/${end}`)

// 根据地区汇总销售额数据(销售量分布) 图表2
export const getOrderRegionApi = (start, end) => request.get(`/order-service/report/regionCollect/${start}/${end}`)

// 获取点位总数
export const getNodeCountApi = () => request.get('/vm-service/node/count')

// 获取合作商点位汇总统计
export const getPartnerNodeApi = () => request.get('/vm-service/node/nodeCollect')

// 获取合作商总数
export const getPartnerCountApi = () => request.get('/user-service/partner/count')
